package com.example.bili.service.impl;

import com.example.bili.entity.History;
import com.example.bili.dao.HistoryDao;
import com.example.bili.service.HistoryService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.PageRequest;

import java.util.List;


/**
 * (History)表服务实现类
 *
 * @author makejava
 * @since 2025-02-20 15:49:37
 */
@Service
public class HistoryServiceImpl implements HistoryService {
    @Resource
    private HistoryDao historyDao;


    @Override
    public List<History> getAllHistory(Integer userId) {
        return historyDao.getAllHistory(userId);
    }

    @Override
    public boolean addHtry(History htry) {
        return historyDao.addHtry(htry)>0;
    }

    @Override
    public boolean delHtry(int id) {
        return historyDao.delHtry(id)>0;
    }
}
